Skip to content

Conversation

@pomianowski
Copy link
Member

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the new behavior?

Rewrite model.

@pomianowski pomianowski merged commit e207248 into main Jul 21, 2025
1 check failed
@pomianowski pomianowski deleted the feature/ms-oapi branch July 21, 2025 11:07
@pomianowski pomianowski self-assigned this Jul 21, 2025
@pomianowski pomianowski requested a review from Copilot July 21, 2025 11:10
@pomianowski pomianowski added the enhancement New feature or request label Jul 21, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a major breaking change to rewrite the OpenAPI Client source generator to use Microsoft's OpenAPI document instead of the custom model. The change moves from a custom schema implementation to leveraging Microsoft.OpenApi libraries for parsing and processing OpenAPI specifications.

  • Replaced custom OpenAPI schema models with Microsoft.OpenApi library
  • Rewrote the source generator architecture to use a simpler, more direct approach
  • Updated test infrastructure and added comprehensive test coverage for multiple OpenAPI versions

Reviewed Changes

Copilot reviewed 110 out of 116 changed files in this pull request and generated 2 comments.

File Description
OpenApiClientGenerator.cs Complete rewrite to use Microsoft.OpenApi instead of custom schema parsing
OpenApi.Client.csproj Updated dependencies and build configuration for new architecture
OpenApi.Client.SourceGenerators.csproj New project structure with Microsoft.OpenApi dependencies
Test files Added comprehensive test infrastructure with support for OpenAPI 1.2-3.1 specifications
Comments suppressed due to low confidence (1)

src/OpenApi.Client.SourceGenerators/OpenApiClientGenerator.cs:56

  • [nitpick] Method name 'ComputeClassForGeneration' is unclear. Consider renaming to 'ExtractMetadataFromSyntax' or 'ParseGeneratorMetadata' to better describe what the method does.
    private static SourceGeneratorMetadata? ComputeClassForGeneration(


GeneratorDriverRunResult result = driver.GetRunResult();

var test = 1;
Copy link

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unused variable 'test'. This appears to be leftover debug code that should be cleaned up.

Suggested change
var test = 1;
// (Line removed)

Copilot uses AI. Check for mistakes.
"type": "string"
},
"description": "User roles."
},
Copy link

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing comma in JSON object is invalid. Remove the comma after the 'roles' property on line 248.

Suggested change
},
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants